home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / fonts-faq / part12 < prev    next >
Encoding:
Text File  |  1995-07-25  |  19.8 KB  |  531 lines

  1. Subject: comp.fonts FAQ: Utilities
  2. Newsgroups: comp.fonts,comp.answers,news.answers
  3. From: norm@ora.com (Norman Walsh)
  4. Date: 9 Nov 1994 07:36:03 -0500
  5.  
  6. Archive-name: fonts-faq/part12
  7. Version: 2.0.4
  8.  
  9. Subject: 10. Utilities
  10.   
  11.   I have just started collecting information about font utilities.  I
  12.   will gladly add any information that you can pass my way.  Please send
  13.   your submissions to norm.
  14.   
  15.   I would appreciate it if you could include a paragraph or so of
  16.   description and the appropriate site/filename for retrieval.
  17.   
  18. Subject: 10.1. PS2PK
  19.   
  20.   PS2PK is a utility for converting Type1 postscript fonts into TeX PK
  21.   files.  The source code is distributed and it has been compiled for
  22.   both *nix boxes and MS-DOS based machines.
  23.   
  24.   Here is the original announcement:
  25.   
  26.                             Ps2pk-1.2 available
  27.                             -------------------
  28.                                  (June 1992)
  29.        
  30.        Version 1.2 of ps2pk is now available on:
  31.        ftp.urc.tue.nl (address: 131.155.2.79)
  32.        directory:    /pub/tex
  33.        files:        ps2pk12.README         (  1k)    This file
  34.                      ps2pk12.tar.Z          (391k)    Sources
  35.                      ps2pk386.zip           (232k)    MSDOS executables
  36.                      utopia.tar.Z           (342k)    Adobe Utopia font family
  37.                      courier.tar.Z          (207k)    IBM Courier font family
  38.        
  39.        For people having difficulties in handling UNIX `.tar.Z' format I
  40.        have made some UNIX tools (only executables) available in:
  41.        directories:  /pub/unixtools/dos
  42.                      /pub/unixtools/vms
  43.        
  44.        See the system specific TARZ file for some help.
  45.        
  46.        Ftp.urc.tue.nl can not handle E-mail requests. But sites are free
  47.        to put the ps2pk12 stuff on any server that can.
  48.   
  49.   When do you need ps2pk?
  50.   =======================
  51.   
  52.   Ps2pk is a tool that converts a PostScript type1 font into a corres-
  53.   ponding TeX PK font.  The tool is especially interesting if you want to
  54.   use fully hinted type1 fonts in your DVI previewer (instead of the
  55.   unhinted type1 fonts currently used in GhostScript) or on a printer
  56.   that has no PostScript interpreter.
  57.   
  58.   In order to use the ps2pk generated fonts your driver and previewer need
  59.   to support virtual fonts.  The reason is that PostScript fonts and TeX
  60.   fonts do have a different font encoding and handle ligatures in a
  61.   different way.  With virtual fonts the PostScript world (encoding +
  62.   ligatures) can be mapped to the old style TeX world on which the current
  63.   plain macro packages still are based (despite the fact that TeX3.0 can
  64.   handle 8bits).
  65.   
  66.   It is also possible to use the ps2pk generated PK fonts directly
  67.   
  68.   In addition, a modified version of PS2PK exists on ibis.cs.umass.edu.  I
  69.   have added some hacks to better support really large renderings and a
  70.   primitive "range" facility.
  71.   
  72. Subject: 10.2. TeX Utilities
  73.   
  74.   There are many TeX font utilities.  For TeX related questions, I direct
  75.   you to comp.text.tex or the Info-TeX mailing list.  I will happily list
  76.   any utilities here that the comp.fonts public feels should be present.
  77.   I am listing MetaFont because it is the obvious font-specific component
  78.   of TeX and PKtoSFP because it allows anyone to use PS2PK to create
  79.   LaserJet softfonts.
  80.   
  81.   Liam R. E. Quin is the original author of the MetaFont section.  It has
  82.   been hacked at a bit by norm to make it fit the tone of the comp.fonts
  83.   FAQ.  Assume that norm is responsible for any errors, not Liam.
  84.   
  85.   MetaFont
  86.   ========
  87.   
  88.   About MetaFont:
  89.   ---------------
  90.   
  91.   Metafont is a programming language for describing fonts.  It was
  92.   written by Donald Knuth and is documented in
  93.   
  94.          Computers & Typesetting/C: The METAFONTbook
  95.          Knuth, Donald E.
  96.          Addison Wesley, 1986
  97.          ISBN 0-201-13445-4, or 0-201-13444-6 (soft cover)
  98.          Library access: Z250.8.M46K58, or 686.2'24, or 85-28675.
  99.   
  100.   A font written in MetaFont is actually a computer program which, when
  101.   run, will generate a bitmap (`raster') for a given typeface at a given
  102.   size, for some particular device.
  103.   
  104.   What do you need in order to use the fonts:
  105.   -------------------------------------------
  106.   
  107.   You cannot print the MetaFont fonts directly (unless you want a listing
  108.   of the program, that is).  Instead, you must generate a bitmap font and
  109.   use that to print something.
  110.   
  111.   If you are using TeX, the sequence of steps is something like this:
  112.   
  113.   MF to MetaFont to GF
  114.        Convert a MetaFont program into a bitmapped font.  Also produces a
  115.           TFM file.
  116.   
  117.   MF to MetaFont to TFM
  118.        Covnert a MetaFont program into a TFM file.  Also produces     a
  119.        GF bitmapped font.
  120.   
  121.   GF to GFtoPK to PK
  122.        Convert a GF bitmapped font into a compressed PK font.
  123.   
  124.   TEX + TFM to TeX to DVI
  125.        Produce a device independent output file.
  126.   
  127.   DVI + PK to dvi driver to output format
  128.        Produce a device-specific output file (or preview).
  129.   
  130.   The above steps are idealized.  In reality, you have to make sure that
  131.   the fonts get installed in the correct places and you may have to
  132.   adjust description files, etc.  The friendly folks on comp.text.tex can
  133.   probably get it staightened out for you if you can't find a local guru.
  134.   
  135.   If you are not using TeX, it's almost impossible to predict.  At some
  136.   point in the above sequence, you'll insert some other conversion
  137.   program and proceed differently.  Here, for example, is how you might
  138.   use TeX fonts with WordPerfect and a LaserJet printer.
  139.   
  140.   PK to PKtoSFP to SFP
  141.        Convert a TeX PK file into an HP LaserJet softfont.
  142.   
  143.   SFP to SFP2Auto to TFM
  144.        Make HP AutoFont Tagged Font Metric file.
  145.   
  146.   SFP + HP AutoFont TFM to PTR to Installed in WP
  147.        Install the new font in WordPerfect.
  148.   
  149.   Use WordPerfect as you normally would.
  150.   
  151. Subject: 10.3. MFPic
  152.   
  153.   MFpic is a macro package for including pictures in TeX documents.  The
  154.   idea behind this package is to have Metafont do the actual drawing, and
  155.   store the pictures in a font that TeX can include in the document.  The
  156.   macros have been designed so that the user should never have to learn
  157.   Metafont to use these macros--the TeX macros actually write the
  158.   Metafont file for you.
  159.   
  160. Subject: 10.4. fig2MF
  161.   
  162.   Briefly, fig2MF uses the mfpic macros to create formatted, commented MF
  163.   code from the fig graphics language. This means that programs like xfig
  164.   can be used as interactive font creation tools. I wrote fig2MF so that
  165.   I could portably illustrate TeX documents, but I suppose one could use
  166.   it to design letterforms as well.
  167.   
  168.   The package consists of a single C source code file, modified mfpic
  169.   macros, documentation, and sample fig files.  It is available at the
  170.   shsu archives.
  171.   
  172. Subject: 10.5. GNU Font Utilities
  173.   
  174.   Here is a brief description of the programs included:
  175.   
  176.      * imageto extracts a bitmap font from an image in PBM or IMG format,
  177.        or   converts the image to Encapsulated PostScript.
  178.   
  179.      * xbfe is a hand-editor for bitmap fonts which runs under X11.
  180.   
  181.      * charspace adds side bearings to a bitmap font.
  182.   
  183.      * limn fits outlines to bitmap characters.
  184.   
  185.      * bzrto converts a generic outline font to Metafont or PostScript.
  186.   
  187.      * gsrenderfont renders a PostScript outline font at a particular
  188.        point   size and resolution, yielding a bitmap font.
  189.   
  190.      * fontconvert can rearrange or delete characters in a bitmap font,
  191.        filter them, split them into pieces, combine them, etc., etc.
  192.   
  193.      * imgrotate rotates or flips an IMG file.
  194.   
  195.   We need volunteers to help create fonts for the GNU project.  You do not
  196.   need to be an expert type designer to help, but you do need to know
  197.   enough about TeX and/or PostScript to be able to install and test new
  198.   fonts.  Example: if you know neither (1) the purpose of TeX utility
  199.   program `gftopk' nor (2) what the PostScript `scalefont' command does,
  200.   you probably need more experience before you can help.
  201.   
  202.   If you can volunteer, the first step is to compile the font utilities.
  203.   After that, contact me [ed: Karl Berry] (karl@gnu.ai.mit.edu).  I will
  204.   get you a scanned type specimen image.  The manual explains how to use
  205.   these utilities to turn that into a font you can use in TeX or
  206.   PostScript.
  207.   
  208.   You can get the source by ftp from any GNU archive site.
  209.   
  210.   You can also order tapes with GNU software from the Free Software
  211.   Foundation (thereby supporting the GNU project); send mail to
  212.   gnu@prep.ai.mit.edu for the latest prices and ordering information, or
  213.   retrieve the file DISTRIB from a GNU archive.
  214.   
  215. Subject: 10.6. Font Editors
  216.   
  217.      * Editors for BDF fonts
  218.   
  219.        There is a bdf font editor that comes with HP/Apollo workstations.
  220.        It's called 'edfont'.  It's not the best but it works.
  221.   
  222.        Gary reports:
  223.   
  224.        The standard X distribution for X11R5 contains "xfed", which
  225.        allows you to play with BDF fonts.  "xfedor" has a more elaborate
  226.        user interface, and is available on most contrib directories.
  227.   
  228.        The last time I tried:
  229.   
  230.        "xfedor" couldn't handle BDF files with more than 256 characters.
  231.   
  232.        "xfed" aborts if the BDF file contains a COMMENT line with no other
  233.        text.  The workaround is to edit the BDF file, to put text after
  234.        the word COMMENT.  A single blank space is sufficient.  For some
  235.        reason, the standard BDF files included in the X release contain
  236.        blank spaces on the otherwise empty COMMENT lines.  It was
  237.        probably easier to add the space to the COMMENT lines of every BDF
  238.        file than it was to fix the lex code for xfed.  :-)
  239.   
  240.      * Editors for PK fonts
  241.   
  242.        The GNU font utilities include an X-based editor called Xbfe which
  243.        edits bitmapped fonts under X.
  244.   
  245.        Eberhard Mattes' emTeX includes PKedit.
  246.   
  247. Subject: 10.7. The T1 Utilities
  248.   
  249.   This is a snippet from the README file for I. Lee Hetherington's
  250.   t1utils package:
  251.   
  252.   t1utils is a collection of simple type-1 font manipulation programs.
  253.   Together, they allow you to convert between PFA (ASCII) and PFB
  254.   (binary) formats, disassemble PFA or PFB files into human-readable
  255.   form, reassemble them into PFA or PFB format.  Additionally you can
  256.   extract font resources from a Macintosh font file (ATM/Laserwriter).
  257.   
  258. Subject: 10.8. Where to get bitmap versions of the fonts
  259.   
  260.   There are archives containing the bitmaps of many of these fonts at
  261.   various sizes and resolutions.  The fonts must have been generated for
  262.   the correct print engine: e.g. write-white or write-black.  The
  263.   archives generally hold only the sizes used by TeX.  These are
  264.   `magstep' sizes, and are not exact point sizes.  It is probably better
  265.   to generate them from the Metafont sources yourself if you can.
  266.   
  267.   The best place to look for raster fonts was almost certainly:
  268.   mims-iris.waterloo.edu
  269.   
  270.   but it isn't any more, the fonts have all gone.  Let me know if you
  271.   find them elsewhere.  Most people seem to have moved to using
  272.   PostScript fonts or Bitstream ones instead now.
  273.   
  274.   Some other sites are:
  275.   
  276.          ctrsci.math.utah.edu (128.110.198.1)
  277.          science.utah.edu (128.110.192.2)
  278.          ymir.claremont.edu (134.173.4.23)
  279.   
  280.   The occasional posting of ftp sites to comp.misc and comp.archives
  281.   lists these and several other sites.
  282.   
  283. Subject: 10.9. Converting between font formats
  284.   
  285.   Conversions to and from pbm and pk format were posted to comp.text.tex
  286.   and to alt.sources on the 9th of August, 1990 by Angus Duggan.  The
  287.   program is pbmtopk, and there are also at least two patches.
  288.   
  289.   Chris Lewis' psroff package includes a program to go from pk both to
  290.   the HP LaserJet and to PostScript.
  291.   
  292.   John McClain <ophelp@tamvenus.bitnet> has some conversion programs for
  293.   various graphics formats to/and from pk files.
  294.   
  295.   A PC program, CAPTURE, turns HPGL files into PK format, US$130 from
  296.   Micro Programs Inc., 251 Jackson Ave., Syosset, NY 11791 U.S.A.
  297.   
  298.   Metaplot can take pen-plotter files and prouce metafont files.  Note:
  299.   Pat Wilcox is no longer at Ohio State.
  300.   
  301.   Kinch Computer Company sell .pk fonts derived from PostScript fonts.
  302.   Kinch Computer Co., 501 S. Meadow St.Ithaca, NY 14850 U.S.A.
  303.   telephone: +1 607 273 0222; fax: +1 607 273 0484
  304.   
  305. Subject: 10.10. Getting fonts by FTP and Mail
  306.   
  307.   If you are using ftp, you will need either the name of the host or the
  308.   Internet number.  For example, to connect to ymir, listed as ftp:
  309.   ymir.claremont.edu [134.173.4.23] you will need to type something like
  310.   
  311.                           ftp ymir.claremont.edu
  312.   
  313.   If that doesn't work, try using the number:
  314.   
  315.                              ftp 134.173.4.23
  316.   
  317.   If that doesn't work, on Unix systems you can use nslookup (it's
  318.   usually /usr/etc/nslookup) to find the host number - it might have
  319.   changed.  Type the entire host name, and after a few seconds nslookup
  320.   will give you the address.  Of course, if you have nslookup installed,
  321.   the first form will probably work...
  322.   
  323.   Once you have connected, you will need to go to the appropriate
  324.   directory, lists its contents, and retrieve the files.
  325.   
  326.   Most of the machines listed here run Unix, and you use "ls" and "cd" to
  327.   list files and to change directories.  Ymir runs VMS, and you will have
  328.   to put square brackets around directory names, like [this].
  329.   
  330.   Remember that although Metafont sources are text files, pk fonts are
  331.   not ASCII, and you will have to use binary mode for them.  In general,
  332.   use text mode for README files and *.mf files, and binary mode for
  333.   other font files.  Files ending in .Z are compressed binary files - you
  334.   will need to use binary mode, and then uncompress the files when you
  335.   get them.
  336.   
  337.   You can get files from ymir by sending mail messages to
  338.   
  339.                         mailserv@ymir.claremont.edu
  340.   
  341.   For example,
  342.   
  343.                        send [tex.mf.misc]cmapl10.mf
  344.   
  345.   will get the file cmapl10.mf from the directory "tex.mf.misc".  You
  346.   can't get binary files in this way.
  347.   
  348.   There is an ftp-by-mail BITNET service, BITFTP, for BITNET users.
  349.   
  350.   Before getting large files by mail, please remember to get permission
  351.   from all intervening sites.  Ask your site administrator, who can send
  352.   mail to Postmaster at each site on the way if necessary.
  353.   
  354. Subject: 10.11. MetaFont to PostScript Conversion
  355.   
  356.   There are (I believe) two programs that perform this task.  At least
  357.   one of them is called "mf2ps".  If you have any more information about
  358.   these tools, please let me know.
  359.   
  360.   Chang Jin-woong reports that he found the "mf2ps" package with Archie.
  361.   It is written by Shimon Yanai <yanai@israearn.bitnet> and Daniel M.
  362.   Berry <dberry@cs.technion.ac.il>. The source programs are written in
  363.   Pascal.
  364.   
  365. Subject: 10.12. How to use Metafont fonts with Troff
  366.   
  367.   If, when you run troff, you get the message `typesetter busy', you have
  368.   the original Ossanna-troff, also called otroff.  Chris Lewis has a
  369.   package which will let you use TeX fonts with troff - it's called
  370.   psroff, and comes with documentation.
  371.   
  372.          ftp: gatekeeper.dec.com (16.1.0.2) pub/misc/psroff-3.0
  373.          ftp: ftp.cs.toronto.edu [128.100.1.105] pub/psroff-3.0/*
  374.   
  375.   If, when you run troff, you get something like this:
  376.   
  377.          x T 300
  378.          x res 300 1 1
  379.   
  380.   you have ditroff.  This is sometimes called titroff or psroff.  In this
  381.   case, you will probably need to do the following:
  382.   
  383.     1. convert the font to your printer's format
  384.   
  385.     2. generate a width table for the font
  386.   
  387.     3. add the font to the DESC file for the appropriate device
  388.   
  389.     4. arrange for troff to download the font
  390.   
  391.     5. tell troff about the font by running `makedev DESC' in the
  392.        right place.
  393.   
  394.   If, when you run troff, you get something like this:
  395.   
  396.          X hp(SCM)(CM)(AF)(AD) 300 1 1
  397.          Y P default letter 2550 3300 0 0 90 90 2460 3210
  398.   
  399.   you have sqtroff:
  400.   
  401.     1. convert the font to your printer's format
  402.   
  403.     2. generate a width table for the font
  404.   
  405.     3. add the font to the DESC file for the appropriate device
  406.   
  407.     4. put the font in the appropriate raster directory
  408.   
  409.     5. tell sqtroff about the font by running `sqmakedev DESC' or
  410.        `sqinstall'.
  411.   
  412.   In each case, you should be able to get help from your vendor.
  413.   
  414.   Note that Chris Lewis' psroff package has software to make width tables
  415.   for troff from pk files.
  416.   
  417. Subject: 10.13. PKtoBDF / MFtoBDF
  418.   
  419.   From the SeeTeX distribution, programs to help previewers under X11.
  420.   They convert TeX PK files into X11 BDF fonts (which can be further
  421.   converted into one or more server native formats).
  422.   
  423. Subject: 10.14. PKtoPS
  424.   
  425.   Included in the psroff distribution, this utility converts PK fonts
  426.   into PostScript fonts (bitmaps, I presume).  If you have any more
  427.   information about these tools, please let me know.
  428.   
  429. Subject: 10.15. PKtoSFP / SFPtoPK
  430.   
  431.   Convert fonts from TeX PK format to HP LaserJet softfont (bitmap)
  432.   format.
  433.   
  434. Subject: 10.16. PostScript to MetaFont
  435.   
  436.   ps2mf started out as a way of creating bitmaps via MF for TeX. Only,
  437.   when I had just finished it, Piet Tutelaers came with ps2pk. This was a
  438.   far superior way runtime-wise. He uses the IBM X11-R5 fontutilities
  439.   library, which is extremely ugly code. But, it works. So, to generate
  440.   bitmaps, I suggest everyone use ps2pk.
  441.   
  442.   To generate a MF outline description, ps2mf is *the* tool. Yannis
  443.   Haralambous has just started a project where he wants to create
  444.   meta-ized fonts for MF from Postscript descriptions. ps2mf does the
  445.   basic conversion. This project wants to revive the use of MF for it is
  446.   a truly beautiful program with enormous possiblities.
  447.   
  448.   The following information comes from the README file for ps2mf:
  449.   
  450.   This is pfb2mf. It is a copyleft program. See the file COPYING for more
  451.   details. I suggest that for the translation of Type-One to readable
  452.   PostScript you use I. Lee Hetherington's Type-1-Utils. You can find
  453.   these somewhere on obelix.icce.rug.nl in pub/erikjan.
  454.   
  455.   If you find any bugs, please do report.
  456.   
  457.   If you have any complaints, please do report.
  458.   
  459.   Now for some info about the different stages. This package contains
  460.   four programs:
  461.   
  462.      * pfb2pfa
  463.   
  464.      * pfa2chr
  465.   
  466.      * chr2ps
  467.   
  468.      * ps2mf
  469.   
  470.   pfb2pfa
  471.   =======
  472.   
  473.   pfb2pfa will decompress an IBM (!) Postscript type 1 fontfile into
  474.   readable           and downloadable hexadecimal data.
  475.   
  476.   The resulting file still contains two layers of encryption:
  477.   
  478.      * eexec encryption
  479.   
  480.      * charstring encryption
  481.   
  482.   pfa2chr
  483.   =======
  484.   
  485.   pfa2chr will do an eexec-decryption of a readable hexadecimal font file
  486.   to a   fontfile with encrypted charstrings.
  487.   
  488.   chr2ps
  489.   ======
  490.   
  491.   chr2ps will perform a charstring-decryption of a font file with
  492.   encrypted   charstrings to fontfile with postscript commands for type 1
  493.   fonts.
  494.   
  495.   With a "-" as filename, these programs will read from <stdin> and write
  496.   to <stdout>. This way you can pipe the results, as in:
  497.   
  498.          pfb2pfa garmnd - | pfa2chr - - | chr2ps - garmnd
  499.   
  500.   This will create a garmnd.ps from garmnd.pfb without explicitely
  501.   creating the intermediate files.
  502.   
  503.   These previous stages can be replaced by (when using Lee Hetherington's
  504.   type-1-utils):
  505.   
  506.   t1disasm garmnd.pfb garmnd.ps
  507.   
  508.   ps2mf
  509.   =====
  510.   
  511.   This last stage will convert to a MetaFont program with the use of the
  512.   corresponding .afm file and a mapping configuration file. It can
  513.   convert   to an ordinary form with Bezier controlpoints. It can also
  514.   generate a curl   specification. For this last option specifify -C.
  515.   
  516. Subject: 10.17. Mac Bitmaps to BDF Format
  517.   
  518.   I [ed: who?] have posted a program which I hacked together for
  519.   extracting all NFNT and FONT resources from a MacBinary form of a
  520.   standard Mac file and dumping the fonts as Adobe BDF files.  It has only
  521.   been compiled and tested on a Sun system to date.  It can be fetched
  522.   from METIS.COM, /pub/mac2bdf.c.
  523.   
  524.   I wrote this tool to be able to use Mac Bitmaps under X Windows and
  525.   OpenWindows (which take Adobe BDF format files).
  526.   
  527.   This is Info file comp.fonts.faq.info, produced by Makeinfo-1.55 from
  528.   the input file FAQ.texinfo.
  529.   
  530.  
  531.